import axios from 'axios'

const headers = {
  'Content-Type': 'application/json'
}

// 指数类型
export const ctMarketsList = data => axios({
  url: `/po_contract/admin/ctMarkets/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})
// 更新指数类型
export const ctMarketsUpdate = data => axios({
  url: `/po_contract/admin/ctMarkets/update`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 合约币种列表
export const ctCurrenciesList = data => axios({
  url: `/po_contract/admin/ctCurrencies/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 更新合约币种
export const ctCurrenciesUpdate = data => axios({
  url: `/po_contract/admin/ctCurrencies/update`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 新增合约币种
export const ctCurrenciesAdd = data => axios({
  url: `/po_contract/admin/ctCurrencies/add`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 结算币种
export const ctCurrenciesCoin = data => axios({
  url: `/po_contract/admin/ctCurrencies/coin`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 杠杆倍数列表
export const ctCurrencieslLeverage = data => axios({
  url: `/po_contract/admin/ctCurrencies/leverage/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 赠金列表
export const ctCouponList = data => axios({
  url: `/po_contract/admin/ctCoupon/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 新增、修改赠金
export const ctCouponInsertOrUpdate = data => axios({
  url: `/po_contract/admin/ctCoupon/insertOrUpdate`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 发放赠金
export const ctCouponGrantPayment = data => axios({
  url: `/po_contract/admin/ctCoupon/grantPayment`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 合约账户
export const ctAssetList = data => axios({
  url: `/po_contract/admin/ctAsset/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 合约账户详情
export const ctAssetFlow = data => axios({
  url: `/po_contract/admin/ctAsset/flow/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 合约订单
export const ctOrdersList = data => axios({
  url: `/po_contract/admin/ctOrders/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 合约订单详情
export const ctOrdersDetail = data => axios({
  url: `/po_contract/admin/ctOrders/detail`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 委托订单
export const ctOrdersdelegateList = data => axios({
  url: `/po_contract/admin/ctOrders/delegate/list`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})

// 委托订单详情
export const ctOrdersdelegateDetail = data => axios({
  url: `/po_contract/admin/ctOrders/delegate/detail`,
  method: 'post',
  data: JSON.stringify(data),
  headers
})
